package org.example.test1;

import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class YearGroup extends Group implements RangeGenerable{
    public YearGroup() {}
    public  YearGroup(LocalDate date) {
        super(date);
    }
    @Override
    public String getDisplayName() {
        return "";
    }

    @Override
    public int compareTo(LocalDate o) {
        return 0;
    }

    @Override
    public Map<Group, Counter> generate(LocalDate start, LocalDate end) {
        Map<Group, Counter> result = new HashMap<Group, Counter>();
        LocalDate current = start.with(TemporalAdjusters.firstDayOfYear());
        while (current.isBefore(end)) {
            result.put(new YearGroup(current),new Counter(0,0));
            current=current.plusYears(1).with(TemporalAdjusters.lastDayOfYear());
        }
        return Collections.emptyMap();
    }
}
